home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993 April: Penguin on DISC / ADC Developer CD (1993-04) (''Penguin On DISC'')_iso / Dev.CD Apr 93.iso / Utilities / MPW Interfaces 7.1 Beta / CIncludes / Quickdraw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-28  |  29.3 KB  |  1,071 lines  |  [TEXT/MPS ]

  1.  
  2. /************************************************************
  3.  
  4. Created: Saturday, July 27, 1991 at 5:34 PM
  5.  Quickdraw.h
  6.  C Interface to the Macintosh Libraries
  7.  
  8.  
  9.   Copyright Apple Computer, Inc. 1985-1991
  10.   All rights reserved
  11.  
  12. *** Warning: This is an alpha version of the Interfaces for Cube-E. 
  13. ***          Things may change.  Caveat Programmer.
  14.  
  15.  
  16. */
  17.  
  18.  
  19. #ifndef __QUICKDRAW__
  20. #define __QUICKDRAW__
  21.  
  22. #ifndef __TYPES__
  23. #include <Types.h>
  24. #endif
  25.  
  26.  
  27. enum {
  28.  
  29.  invalColReq = -1,                    /*invalid color table request*/
  30.  
  31. /* transfer modes */
  32.  srcCopy = 0,                        /*the 16 transfer modes*/
  33.  srcOr = 1,
  34.  srcXor = 2,
  35.  srcBic = 3,
  36.  notSrcCopy = 4,
  37.  notSrcOr = 5,
  38.  notSrcXor = 6,
  39.  notSrcBic = 7,
  40.  patCopy = 8,
  41.  patOr = 9,
  42.  patXor = 10,
  43.  patBic = 11,
  44.  notPatCopy = 12,
  45.  notPatOr = 13,
  46.  notPatXor = 14,
  47.  notPatBic = 15,
  48.  
  49. /* Special Text Transfer Mode */
  50.  grayishTextOr = 49,
  51.  
  52. /* Arithmetic transfer modes */
  53.  blend = 32,
  54.  addPin = 33
  55. };
  56. enum {
  57.  addOver = 34,
  58.  subPin = 35,
  59.  addMax = 37,
  60.  adMax = 37,
  61.  subOver = 38,
  62.  adMin = 39,
  63.  ditherCopy = 64,
  64.  
  65. /* Transparent mode constant */
  66.  transparent = 36,
  67.  
  68. /* QuickDraw color separation constants */
  69.  normalBit = 0,                        /*normal screen mapping*/
  70.  inverseBit = 1,                    /*inverse screen mapping*/
  71.  redBit = 4,                        /*RGB additive mapping*/
  72.  greenBit = 3,
  73.  blueBit = 2,
  74.  cyanBit = 8,                        /*CMYBk subtractive mapping*/
  75.  magentaBit = 7,
  76.  yellowBit = 6,
  77.  blackBit = 5,
  78.  blackColor = 33,                    /*colors expressed in these mappings*/
  79.  whiteColor = 30,
  80.  redColor = 205
  81. };
  82. enum {
  83.  greenColor = 341,
  84.  blueColor = 409,
  85.  cyanColor = 273,
  86.  magentaColor = 137,
  87.  yellowColor = 69,
  88.  
  89.  picLParen = 0,                        /*standard picture comments*/
  90.  picRParen = 1,
  91.  
  92.  normal = 0,
  93.  bold = 1,
  94.  italic = 2,
  95.  underline = 4,
  96.  outline = 8,
  97.  shadow = 0x10,
  98.  condense = 0x20,
  99.  extend = 0x40,
  100.  
  101.  clutType = 0,                        /*0 if lookup table*/
  102.  fixedType = 1,                        /*1 if fixed table*/
  103.  directType = 2,                    /*2 if direct values*/
  104.  
  105.  gdDevType = 0,                        /*0 = monochrome 1 = color*/
  106.  burstDevice = 7
  107. };
  108. enum {
  109.  ext32Device = 8,
  110.  ramInit = 10,                        /*1 if initialized from 'scrn' resource*/
  111.  mainScreen = 11,                    /* 1 if main screen */
  112.  allInit = 12,                        /* 1 if all devices initialized */
  113.  screenDevice = 13,                    /*1 if screen device [not used]*/
  114.  noDriver = 14,                        /* 1 if no driver for this GDevice */
  115.  screenActive = 15,                    /*1 if in use*/
  116.  
  117.  hiliteBit = 7,                        /*flag bit in HiliteMode (lowMem flag)*/
  118.  pHiliteBit = 0,                    /*flag bit in HiliteMode used with BitClr procedure*/
  119.  
  120.  defQDColors = 127,                    /*resource ID of clut for default QDColors*/
  121.  
  122. /* pixel type */
  123.  RGBDirect = 16,                    /* 16 & 32 bits/pixel pixelType value */
  124.  
  125. /* pmVersion values */
  126.  baseAddr32 = 4,                    /*pixmap base address is 32-bit address*/
  127.  
  128.  rgnOverflowErr = -147,                /* Region accumulation failed. Resulting region may be currupt */
  129.  insufficientStackErr = -149        /* QuickDraw could not complete the operation */
  130. };
  131.  
  132. enum {frame,paint,erase,invert,fill};
  133. typedef unsigned char GrafVerb;
  134.  
  135. enum {chunky,chunkyPlanar,planar};
  136. typedef unsigned char PixelType;
  137.  
  138.  
  139. typedef short Bits16[16];
  140.  
  141. #define dangerousPattern 1  //  This #define is here to support BBS builds temporarily until the 
  142.                             //  sources Can be modified to conform to the new definition.  It *must*
  143.                             //  be Removed when producing a public version of this file <21>
  144.  
  145. /***************   IMPORTANT NOTE REGARDING PATTERN  **************************************
  146.    The old array defintion of Pattern would cause 68000 based CPU's to crash in certain circum-
  147.    stances. The new struct definition is safe, but may require source code changes to compile.
  148.    Read the details in Appendix J of:
  149.            "MPW E.T.O. #6 Latest Libraries/Interfaces"
  150.     If you decide that you are safe, and happier with the old definition, you may add
  151.    "-d dangerousPattern" to your C command line to avoid compilation errors without changing
  152.    your source code.
  153. *********************************************************************************************/
  154. #ifdef dangerousPattern
  155. typedef unsigned char Pattern[8];
  156. typedef Pattern *PatPtr;
  157. typedef const unsigned char *ConstPatternParam;
  158. #else
  159. struct Pattern{
  160.    unsigned char pat[8];
  161. };
  162. typedef struct Pattern Pattern;
  163. typedef Pattern *PatPtr;
  164. typedef const Pattern *ConstPatternParam;
  165. #endif
  166. typedef PatPtr *PatHandle;
  167.  
  168. typedef char QDByte, *QDPtr, **QDHandle;
  169.  
  170. typedef short QDErr;
  171.  
  172. enum {singleDevicesBit = 0, dontMatchSeedsBit = 1, allDevicesBit = 2};
  173. enum {singleDevices = 1 << singleDevicesBit, dontMatchSeeds = 1 << dontMatchSeedsBit,
  174.  allDevices = 1 << allDevicesBit};
  175. typedef unsigned long DeviceLoopFlags;
  176.  
  177.  
  178. struct FontInfo {
  179.  short ascent;
  180.  short descent;
  181.  short widMax;
  182.  short leading;
  183. };
  184.  
  185. typedef struct FontInfo FontInfo;
  186.  
  187. struct BitMap {
  188.  Ptr baseAddr;
  189.  short rowBytes;
  190.  Rect bounds;
  191. };
  192.  
  193. typedef struct BitMap BitMap;
  194. typedef BitMap *BitMapPtr, **BitMapHandle;
  195.  
  196. struct Cursor {
  197.  Bits16 data;
  198.  Bits16 mask;
  199.  Point hotSpot;
  200. };
  201.  
  202. typedef struct Cursor Cursor;
  203. typedef Cursor *CursPtr, **CursHandle;
  204.  
  205. struct PenState {
  206.  Point pnLoc;
  207.  Point pnSize;
  208.  short pnMode;
  209.  Pattern pnPat;
  210. };
  211.  
  212. typedef struct PenState PenState;
  213.  
  214. struct Region {
  215.  short rgnSize;                        /*size in bytes*/
  216.  Rect rgnBBox;                        /*enclosing rectangle*/
  217. };
  218.  
  219. typedef struct Region Region;
  220. typedef Region *RgnPtr, **RgnHandle;
  221.  
  222. struct Picture {
  223.  short picSize;
  224.  Rect picFrame;
  225. };
  226.  
  227. typedef struct Picture Picture;
  228. typedef Picture *PicPtr, **PicHandle;
  229.  
  230. struct Polygon {
  231.  short polySize;
  232.  Rect polyBBox;
  233.  Point polyPoints[1];
  234. };
  235.  
  236. typedef struct Polygon Polygon;
  237. typedef Polygon *PolyPtr, **PolyHandle;
  238.  
  239. struct QDProcs {
  240.  Ptr textProc;
  241.  Ptr lineProc;
  242.  Ptr rectProc;
  243.  Ptr rRectProc;
  244.  Ptr ovalProc;
  245.  Ptr arcProc;
  246.  Ptr polyProc;
  247.  Ptr rgnProc;
  248.  Ptr bitsProc;
  249.  Ptr commentProc;
  250.  Ptr txMeasProc;
  251.  Ptr getPicProc;
  252.  Ptr putPicProc;
  253. };
  254.  
  255. typedef struct QDProcs QDProcs;
  256. typedef QDProcs *QDProcsPtr;
  257.  
  258. struct GrafPort {
  259.  short device;
  260.  BitMap portBits;
  261.  Rect portRect;
  262.  RgnHandle visRgn;
  263.  RgnHandle clipRgn;
  264.  Pattern bkPat;
  265.  Pattern fillPat;
  266.  Point pnLoc;
  267.  Point pnSize;
  268.  short pnMode;
  269.  Pattern pnPat;
  270.  short pnVis;
  271.  short txFont;
  272.  Style txFace;                        /*txFace is unpacked byte but push as short*/
  273.  char filler;
  274.  short txMode;
  275.  short txSize;
  276.  Fixed spExtra;
  277.  long fgColor;
  278.  long bkColor;
  279.  short colrBit;
  280.  short patStretch;
  281.  Handle picSave;
  282.  Handle rgnSave;
  283.  Handle polySave;
  284.  QDProcsPtr grafProcs;
  285. };
  286.  
  287. typedef struct GrafPort GrafPort;
  288. typedef GrafPort *GrafPtr;
  289.  
  290.  
  291. typedef GrafPtr WindowPtr;
  292.  
  293. struct RGBColor {
  294.  unsigned short red;                /*magnitude of red component*/
  295.  unsigned short green;                /*magnitude of green component*/
  296.  unsigned short blue;                /*magnitude of blue component*/
  297. };
  298.  
  299. typedef struct RGBColor RGBColor;
  300.  
  301.  
  302. typedef pascal Boolean (*ColorSearchProcPtr)(RGBColor *rgb, long *position);
  303. typedef pascal Boolean (*ColorComplementProcPtr)(RGBColor *rgb);
  304.  
  305. struct ColorSpec {
  306.  short value;                        /*index or other value*/
  307.  RGBColor rgb;                        /*true color*/
  308. };
  309.  
  310. typedef struct ColorSpec ColorSpec;
  311. typedef ColorSpec *ColorSpecPtr;
  312.  
  313.  
  314. typedef ColorSpec CSpecArray[1];
  315.  
  316. struct ColorTable {
  317.  long ctSeed;                        /*unique identifier for table*/
  318.  short ctFlags;                        /*high bit: 0 = PixMap; 1 = device*/
  319.  short ctSize;                        /*number of entries in CTTable*/
  320.  CSpecArray ctTable;                /*array [0..0] of ColorSpec*/
  321. };
  322.  
  323. typedef struct ColorTable ColorTable;
  324. typedef ColorTable *CTabPtr, **CTabHandle;
  325.  
  326. struct MatchRec {
  327.  unsigned short red;
  328.  unsigned short green;
  329.  unsigned short blue;
  330.  long matchData;
  331. };
  332.  
  333. typedef struct MatchRec MatchRec;
  334.  
  335. struct PixMap {
  336.  Ptr baseAddr;                        /*pointer to pixels*/
  337.  short rowBytes;                    /*offset to next line*/
  338.  Rect bounds;                        /*encloses bitmap*/
  339.  short pmVersion;                    /*pixMap version number*/
  340.  short packType;                    /*defines packing format*/
  341.  long packSize;                        /*length of pixel data*/
  342.  Fixed hRes;                        /*horiz. resolution (ppi)*/
  343.  Fixed vRes;                        /*vert. resolution (ppi)*/
  344.  short pixelType;                    /*defines pixel type*/
  345.  short pixelSize;                    /*# bits in pixel*/
  346.  short cmpCount;                    /*# components in pixel*/
  347.  short cmpSize;                        /*# bits per component*/
  348.  long planeBytes;                    /*offset to next plane*/
  349.  CTabHandle pmTable;                /*color map for this pixMap*/
  350.  long pmReserved;                    /*for future use. MUST BE 0*/
  351. };
  352.  
  353. typedef struct PixMap PixMap;
  354. typedef PixMap *PixMapPtr, **PixMapHandle;
  355.  
  356. struct PixPat {
  357.  short patType;                        /*type of pattern*/
  358.  PixMapHandle patMap;                /*the pattern's pixMap*/
  359.  Handle patData;                    /*pixmap's data*/
  360.  Handle patXData;                    /*expanded Pattern data*/
  361.  short patXValid;                    /*flags whether expanded Pattern valid*/
  362.  Handle patXMap;                    /*Handle to expanded Pattern data*/
  363.  Pattern pat1Data;                    /*old-Style pattern/RGB color*/
  364. };
  365.  
  366. typedef struct PixPat PixPat;
  367. typedef PixPat *PixPatPtr, **PixPatHandle;
  368.  
  369. struct CCrsr {
  370.  short crsrType;                    /*type of cursor*/
  371.  PixMapHandle crsrMap;                /*the cursor's pixmap*/
  372.  Handle crsrData;                    /*cursor's data*/
  373.  Handle crsrXData;                    /*expanded cursor data*/
  374.  short crsrXValid;                    /*depth of expanded data (0 if none)*/
  375.  Handle crsrXHandle;                /*future use*/
  376.  Bits16 crsr1Data;                    /*one-bit cursor*/
  377.  Bits16 crsrMask;                    /*cursor's mask*/
  378.  Point crsrHotSpot;                    /*cursor's hotspot*/
  379.  long crsrXTable;                    /*private*/
  380.  long crsrID;                        /*private*/
  381. };
  382.  
  383. typedef struct CCrsr CCrsr;
  384. typedef CCrsr *CCrsrPtr, **CCrsrHandle;
  385.  
  386. struct CIcon {
  387.  PixMap iconPMap;                    /*the icon's pixMap*/
  388.  BitMap iconMask;                    /*the icon's mask*/
  389.  BitMap iconBMap;                    /*the icon's bitMap*/
  390.  Handle iconData;                    /*the icon's data*/
  391.  short iconMaskData[1];                /*icon's mask and BitMap data*/
  392. };
  393.  
  394. typedef struct CIcon CIcon;
  395. typedef CIcon *CIconPtr, **CIconHandle;
  396.  
  397. struct GammaTbl {
  398.  short gVersion;                    /*gamma version number*/
  399.  short gType;                        /*gamma data type*/
  400.  short gFormulaSize;                /*Formula data size*/
  401.  short gChanCnt;                    /*number of channels of data*/
  402.  short gDataCnt;                    /*number of values/channel*/
  403.  short gDataWidth;                    /*bits/corrected value (data packed to next larger byte size)*/
  404.  short gFormulaData[1];                /*data for formulas followed by gamma values*/
  405. };
  406.  
  407. typedef struct GammaTbl GammaTbl;
  408. typedef GammaTbl *GammaTblPtr, **GammaTblHandle;
  409.  
  410. struct ITab {
  411.  long iTabSeed;                        /*copy of CTSeed from source CTable*/
  412.  short iTabRes;                        /*bits/channel resolution of iTable*/
  413.  unsigned char iTTable[1];            /*byte colortable index values*/
  414. };
  415.  
  416. typedef struct ITab ITab;
  417. typedef ITab *ITabPtr, **ITabHandle;
  418.  
  419. struct SProcRec {
  420.  Handle nxtSrch;                    /*SProcHndl Handle to next SProcRec*/
  421.  ColorSearchProcPtr srchProc;        /*pointer to search procedure*/
  422. };
  423.  
  424. typedef struct SProcRec SProcRec;
  425. typedef SProcRec *SProcPtr, **SProcHndl;
  426.  
  427. struct CProcRec {
  428.  Handle nxtComp;                    /*CProcHndl Handle to next CProcRec*/
  429.  ColorComplementProcPtr compProc;    /*pointer to complement procedure*/
  430. };
  431.  
  432. typedef struct CProcRec CProcRec;
  433. typedef CProcRec *CProcPtr, **CProcHndl;
  434.  
  435. struct GDevice {
  436.  short gdRefNum;                    /*driver's unit number*/
  437.  short gdID;                        /*client ID for search procs*/
  438.  short gdType;                        /*fixed/CLUT/direct*/
  439.  ITabHandle gdITable;                /*Handle to inverse lookup table*/
  440.  short gdResPref;                    /*preferred resolution of GDITable*/
  441.  SProcHndl gdSearchProc;            /*search proc list head*/
  442.  CProcHndl gdCompProc;                /*complement proc list*/
  443.  short gdFlags;                        /*grafDevice flags word*/
  444.  PixMapHandle gdPMap;                /*describing pixMap*/
  445.  long gdRefCon;                        /*reference value*/
  446.  Handle gdNextGD;                    /*GDHandle Handle of next gDevice*/
  447.  Rect gdRect;                        /* device's bounds in global coordinates*/
  448.  long gdMode;                        /*device's current mode*/
  449.  short gdCCBytes;                    /*depth of expanded cursor data*/
  450.  short gdCCDepth;                    /*depth of expanded cursor data*/
  451.  Handle gdCCXData;                    /*Handle to cursor's expanded data*/
  452.  Handle gdCCXMask;                    /*Handle to cursor's expanded mask*/
  453.  long gdReserved;                    /*future use. MUST BE 0*/
  454. };
  455.  
  456. typedef struct GDevice GDevice;
  457. typedef GDevice *GDPtr, **GDHandle;
  458.  
  459. struct GrafVars {
  460.  RGBColor rgbOpColor;                /*color for addPin  subPin and average*/
  461.  RGBColor rgbHiliteColor;            /*color for hiliting*/
  462.  Handle pmFgColor;                    /*palette Handle for foreground color*/
  463.  short pmFgIndex;                    /*index value for foreground*/
  464.  Handle pmBkColor;                    /*palette Handle for background color*/
  465.  short pmBkIndex;                    /*index value for background*/
  466.  short pmFlags;                        /*flags for Palette Manager*/
  467. };
  468.  
  469. typedef struct GrafVars GrafVars;
  470. typedef GrafVars *GVarPtr, **GVarHandle;
  471.  
  472. struct CQDProcs {
  473.  Ptr textProc;
  474.  Ptr lineProc;
  475.  Ptr rectProc;
  476.  Ptr rRectProc;
  477.  Ptr ovalProc;
  478.  Ptr arcProc;
  479.  Ptr polyProc;
  480.  Ptr rgnProc;
  481.  Ptr bitsProc;
  482.  Ptr commentProc;
  483.  Ptr txMeasProc;
  484.  Ptr getPicProc;
  485.  Ptr putPicProc;
  486.  Ptr opcodeProc;                    /*fields added to QDProcs*/
  487.  Ptr newProc1;
  488.  Ptr newProc2;
  489.  Ptr newProc3;
  490.  Ptr newProc4;
  491.  Ptr newProc5;
  492.  Ptr newProc6;
  493. };
  494.  
  495. typedef struct CQDProcs CQDProcs;
  496. typedef CQDProcs *CQDProcsPtr;
  497.  
  498. struct CGrafPort {
  499.  short device;
  500.  PixMapHandle portPixMap;            /*port's pixel map*/
  501.  short portVersion;                    /*high 2 bits always set*/
  502.  Handle grafVars;                    /*Handle to more fields*/
  503.  short chExtra;                        /*character extra*/
  504.  short pnLocHFrac;                    /*pen fraction*/
  505.  Rect portRect;
  506.  RgnHandle visRgn;
  507.  RgnHandle clipRgn;
  508.  PixPatHandle bkPixPat;                /*background pattern*/
  509.  RGBColor rgbFgColor;                /*RGB components of fg*/
  510.  RGBColor rgbBkColor;                /*RGB components of bk*/
  511.  Point pnLoc;
  512.  Point pnSize;
  513.  short pnMode;
  514.  PixPatHandle pnPixPat;                /*pen's pattern*/
  515.  PixPatHandle fillPixPat;            /*fill pattern*/
  516.  short pnVis;
  517.  short txFont;
  518.  Style txFace;                        /*txFace is unpacked byte  push as short*/
  519.  char filler;
  520.  short txMode;
  521.  short txSize;
  522.  Fixed spExtra;
  523.  long fgColor;
  524.  long bkColor;
  525.  short colrBit;
  526.  short patStretch;
  527.  Handle picSave;
  528.  Handle rgnSave;
  529.  Handle polySave;
  530.  CQDProcsPtr grafProcs;
  531. };
  532.  
  533. typedef struct CGrafPort CGrafPort;
  534. typedef CGrafPort *CGrafPtr;
  535.  
  536.  
  537. typedef CGrafPtr CWindowPtr;
  538.  
  539. struct ReqListRec {
  540.  short reqLSize;                    /*request list size*/
  541.  short reqLData[1];                    /*request list data*/
  542. };
  543.  
  544. typedef struct ReqListRec ReqListRec;
  545.  
  546. struct OpenCPicParams {
  547.  Rect srcRect;
  548.  Fixed hRes;
  549.  Fixed vRes;
  550.  short version;
  551.  short reserved1;
  552.  long reserved2;
  553. };
  554.  
  555. typedef struct OpenCPicParams OpenCPicParams;
  556.  
  557.  
  558. typedef pascal void (*DeviceLoopDrawingProcPtr)(short depth, short deviceFlags, GDHandle targetDevice,  long userData);
  559.  
  560. extern struct  {
  561. char privates[76];
  562. long randSeed;
  563. BitMap screenBits;
  564. Cursor arrow;
  565. Pattern dkGray;
  566. Pattern ltGray;
  567. Pattern gray;
  568. Pattern black;
  569. Pattern white;
  570. GrafPtr thePort;
  571. }qd;
  572.  
  573.  
  574. #ifdef __cplusplus
  575. extern "C" {
  576. #endif
  577. pascal void InitGraf(void *globalPtr)
  578.  = 0xA86E; 
  579. pascal void OpenPort(GrafPtr port)
  580.  = 0xA86F; 
  581. pascal void InitPort(GrafPtr port)
  582.  = 0xA86D; 
  583. pascal void ClosePort(GrafPtr port)
  584.  = 0xA87D; 
  585. pascal void SetPort(GrafPtr port)
  586.  = 0xA873; 
  587. pascal void GetPort(GrafPtr *port)
  588.  = 0xA874; 
  589. pascal void GrafDevice(short device)
  590.  = 0xA872; 
  591. pascal void SetPortBits(const BitMap *bm)
  592.  = 0xA875; 
  593. pascal void PortSize(short width,short height)
  594.  = 0xA876; 
  595. pascal void MovePortTo(short leftGlobal,short topGlobal)
  596.  = 0xA877; 
  597. pascal void SetOrigin(short h,short v)
  598.  = 0xA878; 
  599. pascal void SetClip(RgnHandle rgn)
  600.  = 0xA879; 
  601. pascal void GetClip(RgnHandle rgn)
  602.  = 0xA87A; 
  603. pascal void ClipRect(const Rect *r)
  604.  = 0xA87B; 
  605. pascal void BackPat(ConstPatternParam pat)
  606.  = 0xA87C; 
  607. pascal void InitCursor(void)
  608.  = 0xA850; 
  609. pascal void SetCursor(const Cursor *crsr)
  610.  = 0xA851; 
  611. pascal void HideCursor(void)
  612.  = 0xA852; 
  613. pascal void ShowCursor(void)
  614.  = 0xA853; 
  615. pascal void ObscureCursor(void)
  616.  = 0xA856; 
  617. pascal void HidePen(void)
  618.  = 0xA896; 
  619. pascal void ShowPen(void)
  620.  = 0xA897; 
  621. pascal void GetPen(Point *pt)
  622.  = 0xA89A; 
  623. pascal void GetPenState(PenState *pnState)
  624.  = 0xA898; 
  625. pascal void SetPenState(const PenState *pnState)
  626.  = 0xA899; 
  627. pascal void PenSize(short width,short height)
  628.  = 0xA89B; 
  629. pascal void PenMode(short mode)
  630.  = 0xA89C; 
  631. pascal void PenPat(ConstPatternParam pat)
  632.  = 0xA89D; 
  633. pascal void PenNormal(void)
  634.  = 0xA89E; 
  635. pascal void MoveTo(short h,short v)
  636.  = 0xA893; 
  637. pascal void Move(short dh,short dv)
  638.  = 0xA894; 
  639. pascal void LineTo(short h,short v)
  640.  = 0xA891; 
  641. pascal void Line(short dh,short dv)
  642.  = 0xA892; 
  643. pascal void TextFont(short font)
  644.  = 0xA887; 
  645. pascal void TextFace(short face)
  646.  = 0xA888; 
  647. pascal void TextMode(short mode)
  648.  = 0xA889; 
  649. pascal void TextSize(short size)
  650.  = 0xA88A; 
  651. pascal void SpaceExtra(Fixed extra)
  652.  = 0xA88E; 
  653. pascal void DrawChar(short ch)
  654.  = 0xA883; 
  655. pascal void DrawString(ConstStr255Param s)
  656.  = 0xA884; 
  657. pascal void DrawText(const void *textBuf,short firstByte,short byteCount)
  658.  = 0xA885; 
  659. pascal short CharWidth(short ch)
  660.  = 0xA88D; 
  661. pascal short StringWidth(ConstStr255Param s)
  662.  = 0xA88C; 
  663. pascal short TextWidth(const void *textBuf,short firstByte,short byteCount)
  664.  = 0xA886; 
  665. pascal void MeasureText(short count,const void *textAddr,void *charLocs)
  666.  = 0xA837; 
  667. pascal void GetFontInfo(FontInfo *info)
  668.  = 0xA88B; 
  669. pascal void ForeColor(long color)
  670.  = 0xA862; 
  671. pascal void BackColor(long color)
  672.  = 0xA863; 
  673. pascal void ColorBit(short whichBit)
  674.  = 0xA864; 
  675. pascal void SetRect(Rect *r,short left,short top,short right,short bottom)
  676.  = 0xA8A7; 
  677. pascal void OffsetRect(Rect *r,short dh,short dv)
  678.  = 0xA8A8; 
  679. pascal void InsetRect(Rect *r,short dh,short dv)
  680.  = 0xA8A9; 
  681. pascal Boolean SectRect(const Rect *src1,const Rect *src2,Rect *dstRect)
  682.  = 0xA8AA; 
  683. pascal void UnionRect(const Rect *src1,const Rect *src2,Rect *dstRect)
  684.  = 0xA8AB; 
  685. pascal Boolean EqualRect(const Rect *rect1,const Rect *rect2)
  686.  = 0xA8A6; 
  687. pascal Boolean EmptyRect(const Rect *r)
  688.  = 0xA8AE; 
  689. pascal void FrameRect(const Rect *r)
  690.  = 0xA8A1; 
  691. pascal void PaintRect(const Rect *r)
  692.  = 0xA8A2; 
  693. pascal void EraseRect(const Rect *r)
  694.  = 0xA8A3; 
  695. pascal void InvertRect(const Rect *r)
  696.  = 0xA8A4; 
  697. pascal void FillRect(const Rect *r,ConstPatternParam pat)
  698.  = 0xA8A5; 
  699. pascal void FrameOval(const Rect *r)
  700.  = 0xA8B7; 
  701. pascal void PaintOval(const Rect *r)
  702.  = 0xA8B8; 
  703. pascal void EraseOval(const Rect *r)
  704.  = 0xA8B9; 
  705. pascal void InvertOval(const Rect *r)
  706.  = 0xA8BA; 
  707. pascal void FillOval(const Rect *r,ConstPatternParam pat)
  708.  = 0xA8BB; 
  709. pascal void FrameRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  710.  = 0xA8B0; 
  711. pascal void PaintRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  712.  = 0xA8B1; 
  713. pascal void EraseRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  714.  = 0xA8B2; 
  715. pascal void InvertRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  716.  = 0xA8B3; 
  717. pascal void FillRoundRect(const Rect *r,short ovalWidth,short ovalHeight,
  718.  ConstPatternParam pat)
  719.  = 0xA8B4; 
  720. pascal void FrameArc(const Rect *r,short startAngle,short arcAngle)
  721.  = 0xA8BE; 
  722. pascal void PaintArc(const Rect *r,short startAngle,short arcAngle)
  723.  = 0xA8BF; 
  724. pascal void EraseArc(const Rect *r,short startAngle,short arcAngle)
  725.  = 0xA8C0; 
  726. pascal void InvertArc(const Rect *r,short startAngle,short arcAngle)
  727.  = 0xA8C1; 
  728. pascal void FillArc(const Rect *r,short startAngle,short arcAngle,ConstPatternParam pat)
  729.  = 0xA8C2; 
  730. pascal RgnHandle NewRgn(void)
  731.  = 0xA8D8; 
  732. pascal void OpenRgn(void)
  733.  = 0xA8DA; 
  734. pascal void CloseRgn(RgnHandle dstRgn)
  735.  = 0xA8DB; 
  736. pascal OSErr BitMapToRegionGlue(RgnHandle region,const BitMap *bMap); 
  737. pascal OSErr BitMapToRegion(RgnHandle region,const BitMap *bMap)
  738.  = 0xA8D7; 
  739. pascal void DisposeRgn(RgnHandle rgn)
  740.  = 0xA8D9; 
  741. pascal void CopyRgn(RgnHandle srcRgn,RgnHandle dstRgn)
  742.  = 0xA8DC; 
  743. pascal void SetEmptyRgn(RgnHandle rgn)
  744.  = 0xA8DD; 
  745. pascal void SetRectRgn(RgnHandle rgn,short left,short top,short right,short bottom)
  746.  = 0xA8DE; 
  747. pascal void RectRgn(RgnHandle rgn,const Rect *r)
  748.  = 0xA8DF; 
  749. pascal void OffsetRgn(RgnHandle rgn,short dh,short dv)
  750.  = 0xA8E0; 
  751. pascal void InsetRgn(RgnHandle rgn,short dh,short dv)
  752.  = 0xA8E1; 
  753. pascal void SectRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  754.  = 0xA8E4; 
  755. pascal void UnionRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  756.  = 0xA8E5; 
  757. pascal void DiffRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  758.  = 0xA8E6; 
  759. pascal void XorRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  760.  = 0xA8E7; 
  761. pascal Boolean RectInRgn(const Rect *r,RgnHandle rgn)
  762.  = 0xA8E9; 
  763. pascal Boolean EqualRgn(RgnHandle rgnA,RgnHandle rgnB)
  764.  = 0xA8E3; 
  765. pascal Boolean EmptyRgn(RgnHandle rgn)
  766.  = 0xA8E2; 
  767. pascal void FrameRgn(RgnHandle rgn)
  768.  = 0xA8D2; 
  769. pascal void PaintRgn(RgnHandle rgn)
  770.  = 0xA8D3; 
  771. pascal void EraseRgn(RgnHandle rgn)
  772.  = 0xA8D4; 
  773. pascal void InvertRgn(RgnHandle rgn)
  774.  = 0xA8D5; 
  775. pascal void FillRgn(RgnHandle rgn,ConstPatternParam pat)
  776.  = 0xA8D6; 
  777. pascal void ScrollRect(const Rect *r,short dh,short dv,RgnHandle updateRgn)
  778.  = 0xA8EF; 
  779. pascal void CopyBits(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  780.  const Rect *dstRect,short mode,RgnHandle maskRgn)
  781.  = 0xA8EC; 
  782. pascal void SeedFill(const void *srcPtr,void *dstPtr,short srcRow,short dstRow,
  783.  short height,short words,short seedH,short seedV)
  784.  = 0xA839; 
  785. pascal void CalcMask(const void *srcPtr,void *dstPtr,short srcRow,short dstRow,
  786.  short height,short words)
  787.  = 0xA838; 
  788. pascal void CopyMask(const BitMap *srcBits,const BitMap *maskBits,const BitMap *dstBits,
  789.  const Rect *srcRect,const Rect *maskRect,const Rect *dstRect)
  790.  = 0xA817; 
  791. pascal PicHandle OpenPicture(const Rect *picFrame)
  792.  = 0xA8F3; 
  793. pascal void PicComment(short kind,short dataSize,Handle dataHandle)
  794.  = 0xA8F2; 
  795. pascal void ClosePicture(void)
  796.  = 0xA8F4; 
  797. pascal void DrawPicture(PicHandle myPicture,const Rect *dstRect)
  798.  = 0xA8F6; 
  799. pascal void KillPicture(PicHandle myPicture)
  800.  = 0xA8F5; 
  801. pascal PolyHandle OpenPoly(void)
  802.  = 0xA8CB; 
  803. pascal void ClosePoly(void)
  804.  = 0xA8CC; 
  805. pascal void KillPoly(PolyHandle poly)
  806.  = 0xA8CD; 
  807. pascal void OffsetPoly(PolyHandle poly,short dh,short dv)
  808.  = 0xA8CE; 
  809. pascal void FramePoly(PolyHandle poly)
  810.  = 0xA8C6; 
  811. pascal void PaintPoly(PolyHandle poly)
  812.  = 0xA8C7; 
  813. pascal void ErasePoly(PolyHandle poly)
  814.  = 0xA8C8; 
  815. pascal void InvertPoly(PolyHandle poly)
  816.  = 0xA8C9; 
  817. pascal void FillPoly(PolyHandle poly,ConstPatternParam pat)
  818.  = 0xA8CA; 
  819. pascal void SetPt(Point *pt,short h,short v)
  820.  = 0xA880; 
  821. pascal void LocalToGlobal(Point *pt)
  822.  = 0xA870; 
  823. pascal void GlobalToLocal(Point *pt)
  824.  = 0xA871; 
  825. pascal short Random(void)
  826.  = 0xA861; 
  827. pascal void StuffHex(void *thingPtr,ConstStr255Param s)
  828.  = 0xA866; 
  829. pascal Boolean GetPixel(short h,short v)
  830.  = 0xA865; 
  831. pascal void ScalePt(Point *pt,const Rect *srcRect,const Rect *dstRect)
  832.  = 0xA8F8; 
  833. pascal void MapPt(Point *pt,const Rect *srcRect,const Rect *dstRect)
  834.  = 0xA8F9; 
  835. pascal void MapRect(Rect *r,const Rect *srcRect,const Rect *dstRect)
  836.  = 0xA8FA; 
  837. pascal void MapRgn(RgnHandle rgn,const Rect *srcRect,const Rect *dstRect)
  838.  = 0xA8FB; 
  839. pascal void MapPoly(PolyHandle poly,const Rect *srcRect,const Rect *dstRect)
  840.  = 0xA8FC; 
  841. pascal void SetStdProcs(QDProcs *procs)
  842.  = 0xA8EA; 
  843. pascal void StdRect(GrafVerb verb,const Rect *r)
  844.  = 0xA8A0; 
  845. pascal void StdRRect(GrafVerb verb,const Rect *r,short ovalWidth,short ovalHeight)
  846.  = 0xA8AF; 
  847. pascal void StdOval(GrafVerb verb,const Rect *r)
  848.  = 0xA8B6; 
  849. pascal void StdArc(GrafVerb verb,const Rect *r,short startAngle,short arcAngle)
  850.  = 0xA8BD; 
  851. pascal void StdPoly(GrafVerb verb,PolyHandle poly)
  852.  = 0xA8C5; 
  853. pascal void StdRgn(GrafVerb verb,RgnHandle rgn)
  854.  = 0xA8D1; 
  855. pascal void StdBits(const BitMap *srcBits,const Rect *srcRect,const Rect *dstRect,
  856.  short mode,RgnHandle maskRgn)
  857.  = 0xA8EB; 
  858. pascal void StdComment(short kind,short dataSize,Handle dataHandle)
  859.  = 0xA8F1; 
  860. pascal short StdTxMeas(short byteCount,const void *textAddr,Point *numer,
  861.  Point *denom,FontInfo *info)
  862.  = 0xA8ED; 
  863. pascal void StdGetPic(void *dataPtr,short byteCount)
  864.  = 0xA8EE; 
  865. pascal void StdPutPic(const void *dataPtr,short byteCount)
  866.  = 0xA8F0; 
  867. pascal void AddPt(Point src,Point *dst)
  868.  = 0xA87E; 
  869. void subpt(Point *src,Point *dst); 
  870. pascal Boolean EqualPt(Point pt1,Point pt2)
  871.  = 0xA881; 
  872. pascal Boolean PtInRect(Point pt,const Rect *r)
  873.  = 0xA8AD; 
  874. pascal void Pt2Rect(Point pt1,Point pt2,Rect *dstRect)
  875.  = 0xA8AC; 
  876. pascal void PtToAngle(const Rect *r,Point pt,short *angle)
  877.  = 0xA8C3; 
  878. pascal Boolean PtInRgn(Point pt,RgnHandle rgn)
  879.  = 0xA8E8; 
  880. pascal void StdText(short count,const void *textAddr,Point numer,Point denom)
  881.  = 0xA882; 
  882. pascal void StdLine(Point newPt)
  883.  = 0xA890; 
  884. pascal void OpenCPort(CGrafPtr port)
  885.  = 0xAA00; 
  886. pascal void InitCPort(CGrafPtr port)
  887.  = 0xAA01; 
  888. pascal void CloseCPort(CGrafPtr port)
  889.  = 0xA87D; 
  890. pascal PixMapHandle NewPixMap(void)
  891.  = 0xAA03; 
  892. pascal void DisposPixMap(PixMapHandle pm)
  893.  = 0xAA04; 
  894. pascal void DisposePixMap(PixMapHandle pm)
  895.  = 0xAA04; 
  896. pascal void CopyPixMap(PixMapHandle srcPM,PixMapHandle dstPM)
  897.  = 0xAA05; 
  898. pascal PixPatHandle NewPixPat(void)
  899.  = 0xAA07; 
  900. pascal void DisposPixPat(PixPatHandle pp)
  901.  = 0xAA08; 
  902. pascal void DisposePixPat(PixPatHandle pp)
  903.  = 0xAA08; 
  904. pascal void CopyPixPat(PixPatHandle srcPP,PixPatHandle dstPP)
  905.  = 0xAA09; 
  906. pascal void PenPixPat(PixPatHandle pp)
  907.  = 0xAA0A; 
  908. pascal void BackPixPat(PixPatHandle pp)
  909.  = 0xAA0B; 
  910. pascal PixPatHandle GetPixPat(short patID)
  911.  = 0xAA0C; 
  912. pascal void MakeRGBPat(PixPatHandle pp,const RGBColor *myColor)
  913.  = 0xAA0D; 
  914. pascal void FillCRect(const Rect *r,PixPatHandle pp)
  915.  = 0xAA0E; 
  916. pascal void FillCOval(const Rect *r,PixPatHandle pp)
  917.  = 0xAA0F; 
  918. pascal void FillCRoundRect(const Rect *r,short ovalWidth,short ovalHeight,
  919.  PixPatHandle pp)
  920.  = 0xAA10; 
  921. pascal void FillCArc(const Rect *r,short startAngle,short arcAngle,PixPatHandle pp)
  922.  = 0xAA11; 
  923. pascal void FillCRgn(RgnHandle rgn,PixPatHandle pp)
  924.  = 0xAA12; 
  925. pascal void FillCPoly(PolyHandle poly,PixPatHandle pp)
  926.  = 0xAA13; 
  927. pascal void RGBForeColor(const RGBColor *color)
  928.  = 0xAA14; 
  929. pascal void RGBBackColor(const RGBColor *color)
  930.  = 0xAA15; 
  931. pascal void SetCPixel(short h,short v,const RGBColor *cPix)
  932.  = 0xAA16; 
  933. pascal void SetPortPix(PixMapHandle pm)
  934.  = 0xAA06; 
  935. pascal void GetCPixel(short h,short v,RGBColor *cPix)
  936.  = 0xAA17; 
  937. pascal void GetForeColor(RGBColor *color)
  938.  = 0xAA19; 
  939. pascal void GetBackColor(RGBColor *color)
  940.  = 0xAA1A; 
  941. pascal void SeedCFill(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  942.  const Rect *dstRect,short seedH,short seedV,ColorSearchProcPtr matchProc,
  943.  long matchData)
  944.  = 0xAA50; 
  945. pascal void CalcCMask(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  946.  const Rect *dstRect,const RGBColor *seedRGB,ColorSearchProcPtr matchProc,
  947.  long matchData)
  948.  = 0xAA4F; 
  949. pascal PicHandle OpenCPicture(const OpenCPicParams *newHeader)
  950.  = 0xAA20; 
  951. pascal void OpColor(const RGBColor *color)
  952.  = 0xAA21; 
  953. pascal void HiliteColor(const RGBColor *color)
  954.  = 0xAA22; 
  955. pascal void DisposCTable(CTabHandle cTable)
  956.  = 0xAA24; 
  957. pascal void DisposeCTable(CTabHandle cTable)
  958.  = 0xAA24; 
  959. pascal CTabHandle GetCTable(short ctID)
  960.  = 0xAA18; 
  961. pascal CCrsrHandle GetCCursor(short crsrID)
  962.  = 0xAA1B; 
  963. pascal void SetCCursor(CCrsrHandle cCrsr)
  964.  = 0xAA1C; 
  965. pascal void AllocCursor(void)
  966.  = 0xAA1D; 
  967. pascal void DisposCCursor(CCrsrHandle cCrsr)
  968.  = 0xAA26; 
  969. pascal void DisposeCCursor(CCrsrHandle cCrsr)
  970.  = 0xAA26; 
  971. pascal CIconHandle GetCIcon(short iconID)
  972.  = 0xAA1E; 
  973. pascal void PlotCIcon(const Rect *theRect,CIconHandle theIcon)
  974.  = 0xAA1F; 
  975. pascal void DisposCIcon(CIconHandle theIcon)
  976.  = 0xAA25; 
  977. pascal void DisposeCIcon(CIconHandle theIcon)
  978.  = 0xAA25; 
  979. pascal void SetStdCProcs(CQDProcs *procs)
  980.  = 0xAA4E; 
  981. pascal void CharExtra(Fixed extra)
  982.  = 0xAA23; 
  983. pascal GDHandle GetMaxDevice(const Rect *globalRect)
  984.  = 0xAA27; 
  985. pascal long GetCTSeed(void)
  986.  = 0xAA28; 
  987. pascal GDHandle GetDeviceList(void)
  988.  = 0xAA29; 
  989. pascal GDHandle GetMainDevice(void)
  990.  = 0xAA2A; 
  991. pascal GDHandle GetNextDevice(GDHandle curDevice)
  992.  = 0xAA2B; 
  993. pascal Boolean TestDeviceAttribute(GDHandle gdh,short attribute)
  994.  = 0xAA2C; 
  995. pascal void SetDeviceAttribute(GDHandle gdh,short attribute,Boolean value)
  996.  = 0xAA2D; 
  997. pascal void InitGDevice(short qdRefNum,long mode,GDHandle gdh)
  998.  = 0xAA2E; 
  999. pascal GDHandle NewGDevice(short refNum,long mode)
  1000.  = 0xAA2F; 
  1001. pascal void DisposGDevice(GDHandle gdh)
  1002.  = 0xAA30; 
  1003. pascal void DisposeGDevice(GDHandle gdh)
  1004.  = 0xAA30; 
  1005. pascal void SetGDevice(GDHandle gd)
  1006.  = 0xAA31; 
  1007. pascal GDHandle GetGDevice(void)
  1008.  = 0xAA32; 
  1009. pascal long Color2Index(const RGBColor *myColor)
  1010.  = 0xAA33; 
  1011. pascal void Index2Color(long index,RGBColor *aColor)
  1012.  = 0xAA34; 
  1013. pascal void InvertColor(RGBColor *myColor)
  1014.  = 0xAA35; 
  1015. pascal Boolean RealColor(const RGBColor *color)
  1016.  = 0xAA36; 
  1017. pascal void GetSubTable(CTabHandle myColors,short iTabRes,CTabHandle targetTbl)
  1018.  = 0xAA37; 
  1019. pascal void MakeITable(CTabHandle cTabH,ITabHandle iTabH,short res)
  1020.  = 0xAA39; 
  1021. pascal void AddSearch(ColorSearchProcPtr searchProc)
  1022.  = 0xAA3A; 
  1023. pascal void AddComp(ColorComplementProcPtr compProc)
  1024.  = 0xAA3B; 
  1025. pascal void DelSearch(ColorSearchProcPtr searchProc)
  1026.  = 0xAA4C; 
  1027. pascal void DelComp(ColorComplementProcPtr compProc)
  1028.  = 0xAA4D; 
  1029. pascal void SubPt(Point src,Point *dst)
  1030.  = 0xA87F; 
  1031. pascal void SetClientID(short id)
  1032.  = 0xAA3C; 
  1033. pascal void ProtectEntry(short index,Boolean protect)
  1034.  = 0xAA3D; 
  1035. Boolean equalpt(Point *pt1,Point *pt2); 
  1036. pascal void ReserveEntry(short index,Boolean reserve)
  1037.  = 0xAA3E; 
  1038. pascal void SetEntries(short start,short count,CSpecArray aTable)
  1039.  = 0xAA3F; 
  1040. Boolean ptinrect(Point *pt,const Rect *r); 
  1041. pascal void SaveEntries(CTabHandle srcTable,CTabHandle resultTable,ReqListRec *selection)
  1042.  = 0xAA49; 
  1043. pascal void RestoreEntries(CTabHandle srcTable,CTabHandle dstTable,ReqListRec *selection)
  1044.  = 0xAA4A; 
  1045. void pt2rect(Point *pt1,Point *pt2,const Rect *destRect); 
  1046. pascal short QDError(void)
  1047.  = 0xAA40; 
  1048. pascal void CopyDeepMask(const BitMap *srcBits,const BitMap *maskBits,const BitMap *dstBits,
  1049.  const Rect *srcRect,const Rect *maskRect,const Rect *dstRect,short mode,
  1050.  RgnHandle maskRgn)
  1051.  = 0xAA51; 
  1052. pascal void DeviceLoop(RgnHandle drawingRgn,DeviceLoopDrawingProcPtr drawingProc,
  1053.  long userData,DeviceLoopFlags flags)
  1054.  = 0xABCA; 
  1055. #pragma parameter __A0 GetMaskTable
  1056. pascal Ptr GetMaskTable(void)
  1057.  = 0xA836; 
  1058. void pttoangle(const Rect *r,Point *pt,short *angle); 
  1059. Boolean ptinrgn(Point *pt,RgnHandle rgn); 
  1060. void stdtext(short count,const void *textAddr,Point *numer,Point *denom); 
  1061. void stdline(Point *newPt); 
  1062. void drawstring(char *s); 
  1063. void addpt(Point *src,Point *dst); 
  1064. void stuffhex(Ptr thingPtr,char *s); 
  1065. short stringwidth(char *s); 
  1066. #ifdef __cplusplus
  1067. }
  1068. #endif
  1069.  
  1070. #endif
  1071.